<template>
	<view class="navbar">
		<u-navbar :autoBack="isBack" :leftIcon="leftIcon" :titleStyle ="titleStyle " :leftIconColor="leftIconColor"  :title="title" :border="false"  :bgColor="background" :fixed="isFixed">
				<slot name="left">
					<u-icon
						v-if="leftIcon"
						:name="leftIcon"
						:size="leftIconSize"
						:color="leftIconColor"
					></u-icon>
					<text
						v-if="title"
						:style="{
							color: leftIconColor
						}"
						class="u-navbar__content__left__text"
					>{{ title }}</text>
				</slot>
		</u-navbar>
	</view>
</template>

<script>
	export default {
		name:"plublic-navbar",
		props: {
		  type: {
		    type: Number,
		    default: 1
		  },
		  leftIconSize: {
		    type: Number,
		    default: 1
		  },
		  leftIconColor: {
		    type: String,
		    default: ''
		  },
		  title: {
		    type: String,
		    default: ''
		  },
		  isBack: {
		    type: Boolean,
		    default: false
		  },
		  titleBold: {
		    type: Boolean,
		    default: false
		  },
		  isFixed: {
		    type: Boolean,
		    default: true
		  },
		  titleColor: {
		    type: String,
		    default: ''
		  },
		  color: {
		    type: String,
		    default: ''
		  },
		  leftIcon:{
			type: String,
			default:'arrow-left'
		  },
		  tlogo: {
		    type: String,
		    default:''
		  },
		  titleSize: {
		    type: Number,
		    default: 44
		  },
		  titleStyle:{
		    type: [String, Object],
		    default:  () => ({})
		  },
		  // attr: {
		  //   type: Object,
		  //   default: () => ({})
		  // },
		  background: {
		    type: String,
		    default: ''
		  },
		},
		data() {
			return {
				  // imgURL:this.$config.imgURL
				// tlogo:'../../static/linquan/common/title.png',
			};
		}
	}
</script>

<style lang="scss" scoped>
.navbar{
	// padding: 0 30rpx;
}
	::v-deep .u-navbar{
		// padding: 0 30rpx;
	}
.navbar ::v-deep .u-navbar-inner{
	// padding: 30rpx;
}
.navbar ::v-deep .u-navbar{
		// padding: 0 30rpx;
	}
.navTitle{
	font-size: 32rpx;
	font-weight: bold;
	padding-left: 10rpx;
	border-left:solid 1px #CED3D6;
	margin-left: 10rpx;
	width: 300rpx;
}
.navbar ::v-deep .u-back-wrap{
	padding-left: 0;
}
</style>